﻿using JshRCSWebApi.Infrastructure;
using JshRCSWebApi.Infrastructure.Domain.DTO.SysService;
using JshRCSWebApi.Infrastructure.Domain.VO.SysService;
using JshRCSWebApi.SqlSugarDB.Model.jshrcs_initial;

namespace JshRCSWebApi.Service.SysService
{
    public interface UserService
    {

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="AccountNum">账号</param>
        /// <param name="PassWord">密码</param>
        /// <param name="CardNum">卡号</param>
        /// <returns></returns>
        public Task<ApiResult> Login(string UserName, string PassWord, string CardNum = "");

        /// <summary>
        /// 获取用户
        /// </summary>
        /// <returns></returns>
        public Task<ApiResult> GetUserInfo(long ID);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public Task<ApiResult> DeleteUser(long ID);

        /// <summary>
        /// 修改用户密码
        /// </summary>
        /// <param name="ID">用户ID</param>
        /// <param name="Pwd">密码</param>
        /// <returns></returns>
        public Task<ApiResult> UpdateUserPWD(UserUpdatePwdDTO pwdDTO);

        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <returns></returns>
        public Task<dynamic> GetUserList(UserSearchDTO userSearch);

        /// <summary>
        /// 通过ID获取用户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<ApiResult> GetUserInfoByID(long id);

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="updateDTO"></param>
        /// <returns></returns>
        public Task<ApiResult> UpdateUser(UserUpdateDTO updateDTO,int UID);

        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public Task<ApiResult> AddUser(UserAddDTO addDTO,int UID);

        public Task<ApiResult> UpdateUserJurisdiction(UserUpdateJurisdictionDTO updateDto, int UID);
        public Task<ApiResult> GetUserAndRoleAllJurisdiction(int UID);
        public Task<ApiResult> LogOut(int UID);
    }
}
